package com.treasure.mall.biz.remote.track;

import com.treasure.mall.biz.remote.track.dto.ReceiveInfo;
import com.treasure.mall.zbq.common.base.ApiResult;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author allan
 * @version 1.0.0
 * @date 2020/6/9
 */
public interface LogisticsProvider {
    /**
     * 查询物流轨迹
     *
     * @param companyCode
     * @param trackingNo
     * @return
     */
    ApiResult query(String companyCode, String trackingNo);

    /**
     * 订阅服务
     * @param comCode
     * @param expressNo
     * @return
     */
    ApiResult subscribe(String comCode, String expressNo);

    /**
     * 订阅回调
     *
     * @param request
     */
    ReceiveInfo subCallback(HttpServletRequest request);

    /**
     * 订阅的返回
     *
     * @param response
     */
    void callbackResp(HttpServletResponse response) throws IOException;
}
